package demo

import (
    "fmt"
    "io/ioutil"

    aepapi "gitee.com/dell_software_department/ctwing_sdk/apis/Tenant_app_statistics"
)

func QueryTenantApiMonthlyCount_Demo() {
    resp, err := aepapi.QueryTenantApiMonthlyCount("dFI1lzE0EN2", "xQcjrfNLvQ")

    if err != nil {
        fmt.Println("QueryTenantApiMonthlyCount err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func QueryTenantAppCount_Demo() {
    resp, err := aepapi.QueryTenantAppCount("dFI1lzE0EN2", "xQcjrfNLvQ")

    if err != nil {
        fmt.Println("QueryTenantAppCount err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
func QueryTenantApiTrend_Demo() {
    resp, err := aepapi.QueryTenantApiTrend("dFI1lzE0EN2", "xQcjrfNLvQ", "", "")

    if err != nil {
        fmt.Println("QueryTenantApiTrend err:", err)
        return
    }
    fmt.Println("code:", resp.StatusCode, "\nerr:", err)
    bodyStr, err1 := ioutil.ReadAll(resp.Body)
    if err1 != nil {
        fmt.Println("ioutil.ReadAll err:", err1)
        return
    }
    fmt.Println(string(bodyStr))

    defer resp.Body.Close()
}
